#!/usr/bin/env python
# -*- coding:UTF-8 -*-
__author__ = 'wycao'

import jieba,os


class JbTitle:
    def __init__(self):
        # jieba.load_userdict(os.getcwd() +'/jiebatitle/mydict.txt')
        jieba.load_userdict(r'/home/wycao/PycharmProjects/getcninfoyeareport/jiebatitle/mydict.txt')
        # text ='2017年第三季度报告全文（更新后）(508 k)'

    def cut_text(self,text):
        cut = jieba.cut(text)
        wordlist =[]
        skiptext =["（","）","(",")"," ","\n"]
        for w in cut:
            if w not in skiptext:
                wordlist.append(w)
        return wordlist

